﻿@model CommentsViewModel

<div class ="comments_title">@Html.GetGlobalResource("ContentList", "Comments")</div>
<div class="comments_body">
@if (Model.Messages.Count > 0) {
	<ul class="comments">
		@foreach (var item in Model.Messages) {
			<li class="comment_title"><span class="comment_date">@item.CreateTime.ToString("dd MMMM yyyy")</span><a class="comment_uname" href="@Url.Action("Profile", "Client", new { id = item.Client.UserId })">@item.Client.FullName</a></li>
        <li class="comment_body">
		@if(item.Like > 0 ){<img class="comment_img_like" src="~/Content/images/like.png"/>}  else  {<img class="comment_img_nlike" src="~/Content/images/unlike.png" />}
		    @item.Comment
        </li>
        }
	</ul>
}
</div>
@if (!Model.readOnly &&  Model.CurrentMembershipUser != null)
{
<div id="add-new-comment" title="@Html.GetGlobalResource("Common", "AddNewComment")">
		@Html.HiddenFor(x => x.Id)
		@Html.HiddenFor(x => x.IsLike)
		@Html.TextAreaFor(x => x.NewMessage)
</div>
}
